package somepackage;

import java.util.List;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableList.Builder;

@Named
@ApplicationScoped
public class DataBase {
	private List<String> db = new FileLister().fileList("/");
	public List<String> suche(String suchText) {
		Builder<String> result = ImmutableList.<String> builder();
		for (String data : db) {
			if (data.contains(suchText)) {
				result.add(data);
			}
		}
		return result.build();
	}
}
